package com.bcxk.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bcxk.entity.dto.Cron;
import com.bcxk.mapper.CronMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class CronService extends ServiceImpl<CronMapper , Cron> {
        @Transactional(readOnly = true)
        public Cron  getCron(Long id ){
            QueryWrapper<Cron> wrapper = new QueryWrapper<>();
            wrapper.lambda().eq(Cron::getId,id);
            return this.getOne(wrapper);
        }
}
